<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@ page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@ include file="/taglibs.jsp"%>
<h1>供应商申请管理</h1>
<div style="color:red">
	<s:actionerror />
	<s:actionmessage />
	<s:fielderror />
</div>
<s:form name="formObj" id="formObj" action="search.do" method="post">
	<table>
		<tr>
			<td>公司名稱:<s:textfield name="keyword" id="keyword" size="40"/>
				<s:select name="approveStatus" list="menuApplyStatus.options" headerKey="" headerValue="全部" listKey="key" listValue="value.name"/>
			</td>
			<td><input type="button" value="搜寻" onclick="document.formObj.submit();"/></td>
			<td><input type="button" value="新增" onclick="location.href='<c-rt:url value="/newSupplierApply/add.do"/>'"/></td>
		</tr>
	</table>
</s:form>
<br/>
<table class="tb-1" width="100%">
	<thead>
		<tr>
			<th>供应商代码</th>
			<th>供应商营业执照注册号</th>
			<th>名称</th>
			<th>审核状态</th>
			<th>建立日期</th>
			<th></th>
		</tr>
	</thead>
	
	<s:if test="newsupplierapplyList.size > 0">
		<tbody>
			<c-rt:forEach items="${newsupplierapplyList}" var="nsa" varStatus="rows_index">
				<tr class="${rows_index.count % 2 == 0 ? 'bg-yl' : ''}">
					<td><a href="#" onclick="location.href='<c-rt:url value="/newSupplierApply/view.do?supplierID=${nsa.supplierID }"/>'">${nsa.supplierID }</a></td>
					<td>${nsa.companyNum }</td>
					<td>${nsa.companyName }</td>
					<td>${pu:menuOption('NewSupplier.approveStatus', pu:toString(nsa.status)).name}</td>					
					<td>${nsa.createDate}</td>
					<c:if test="${nsa.status eq '2' or nsa.status eq '9'}">
						<td><input type="button" value="查看" onclick="location.href='<c-rt:url value="/newSupplierApply/view.do?supplierID=${nsa.supplierID }"/>'"/>
						</td>
					</c:if>
					<c:if test="${nsa.status eq '0' or nsa.status eq '1'}">
					<td><input type="button" value="编辑" onclick="location.href='<c-rt:url value="/newSupplierApply/edit.do?supplierID=${nsa.supplierID }"/>'"/>
					</td>
					</c:if>
				</tr>			
			</c-rt:forEach>
		</tbody>
	</s:if>
	<s:else>
		<tbody>
			<tr class="bg-yl"><td colspan="6">查无资料!!</td></tr>
		</tbody>
	</s:else>
</table>
<yaodian100:pageutil link="search.do" pagerObj="${pager}" />